Repository navigation
[examples] Use render width for high-DPI pixel grid - #6447
Open
yex743055-sudo wants to merge 1 commit into
Open
yex743055-sudo wants to merge 1 commit into
yex743055-sudo wants to merge 1 commit into
Conversation
Owner
|
@yex743055-sudo I don't understand the issue, please, could you provide some screenshot/video illustrating the issue and the fix? |
Contributor
Author
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


On Windows GLFW at 150% scaling, removing
FLAG_WINDOW_HIGHDPIfromcore_highdpi_demoleaves both widths at 800 whileGetWindowScaleDPI()still returns 1.5. The 50-pixel grid marks then appear about 33 pixels apart.Convert framebuffer coordinates using the ratio of logical width to render width, and document how to compare with the flag disabled. This follows the DPI reporting change in #6402.
Tested on Windows 11 with Visual Studio 2022 at 100% and 150%, with HiDPI off and on. Pixel readback verified the grid in all four cases. At 100%, the captured frames were identical before and after.